<!--编辑投资-->
<!--编辑咨询-->
<template>
    <div>
        <el-row>
            <el-col :span="18">
                <!--添加关键人物-->
                <h3>关键人物</h3>
                <el-form :inline="true"  class="demo-form-inline" v-for="(item,index) in keyManmessage" style="padding-left: 80px">
                    <el-form-item >
                        <el-select v-model="entrepot[index].name" placeholder="请选择">
                            <el-option
                                    v-for="data in item.man"
                                    :label="data.label"
                                    :value="data.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="职务">
                        <el-select v-model="entrepot[index].status" placeholder="请选择">
                            <el-option
                                    v-for="data in item.man"
                                    :key="data.value"
                                    :label="data.label"
                                    :value="data.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-button type="text" @click="delMan(index)">移除</el-button>
                </el-form>
                <el-button type="info" @click="addMan" style="margin-left: 80px">添加人物</el-button>
            </el-col>
            <el-col :span="1">
                <hr style="height:200px;width: 1px">
            </el-col>
            <el-col :span="5"><div >
                <h2>评价星级</h2>
                <el-form :inline="true" :model="formI" class="demo-form-inline">
                    <el-form-item>
                        <el-select v-model="formI.invest_evaluate_star" placeholder="评价星级">
                            <el-option label="一星" value="1"></el-option>
                            <el-option label="二星" value="2"></el-option>
                            <el-option label="三星" value="3"></el-option>
                            <el-option label="四星" value="4"></el-option>
                            <el-option label="五星" value="5"></el-option>
                        </el-select>
                    </el-form-item>
                </el-form>
            </div></el-col>
        </el-row>
        <!--<div style="width:100px;margin-left:80%">-->
            <!--<el-button type="warning" @click="sendFormD">保存能力</el-button>-->
        <!--</div>-->
    </div>
</template>
<script>
    import Bus from '@/config/bus.js'
    export default {
        data() {
            return {
                formI:{
                    invest_evaluate_star:''
                },
                //                关键人物信息存储
                entrepot:[{name:'',status:''}],
                keyManmessage:[{
                    man:[
                        {
                            value: '选项4',
                            label: '龙须面'
                        }, {
                            value: '选项5',
                            label: '北京烤鸭'
                        }
                    ],
                    duty:[
                        {
                            value: '选项4',
                            label: '龙须面'
                        },
                        {
                            value: '选项5',
                            label: '北京烤鸭'
                        }
                    ]}
                ],
                information:{
                    classes:'综合',
                    issued:'住建部',
                    grade:'甲级',
                    charge:'100000元每案',
                    professField:'土地规划，环保设计',
                    keyMan1:'俞兆洪-总裁/CEO-18058715658',
                    keyMan2:'吴高翔-销售-18058715658'
                },
                formInline: {
                    user: '',
                    region: '',
                    star:''

                }
            }
        },
        methods:{
            //            传递参数的方法
            sendFormD(){
                var that = this
                setTimeout(function(){
                    Bus.$emit("submitFormI",that.formI)
                    that.$message({
                        message: '保存成功',
                        type: 'success'
                    });
                },200)
            },
            addMan(){
                this.entrepot.push(
                        {name:'',status:''}
                )
                this.keyManmessage.push(
                        {
                            man:[
                                {
                                    value: '选项4',
                                    label: '人物一'
                                }, {
                                    value: '选项5',
                                    label: '人物二'
                                }
                            ],
                            duty:[
                                {
                                    value: '选项4',
                                    label: 'CEO'
                                },
                                {
                                    value: '选项5',
                                    label: '经理'
                                }
                            ]}
                )
            },
            delMan(index){
                this.entrepot.splice(index,1)
                this.keyManmessage.splice(index,1)
            },
            openDialog(dialog){
                this.dialog[dialog].open = true
            }
        }
    }
</script>